﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Security;
using SCRUM.Core.BusinessObjects;

namespace SCRUM.Core.MembershipProviders
{
    /// <summary>
    /// Interface for all role providers
    /// </summary>
    public abstract class RoleDataProvider : RoleProvider
    {
        /// <summary>
        /// Gets users acording to their role and team
        /// </summary>
        /// <param name="roleName">desired role</param>
        /// <param name="teamID">ID of the team</param>
        /// <returns>
		/// A list containing all the elements that match the conditions defined by the specified parameters.
		///</returns>
        public abstract List<User> GetUsersInRoleInTeam(string roleName, int teamID);

		/// <summary>
		/// Gets all roles.
		/// </summary>
		/// <param name="teamRolesOnly">if set to <c>true</c> [team roles only].</param>
		/// <returns>
		/// A list containing all the elements that match the conditions defined by the specified parameters.
		/// </returns>
        public abstract List<Role> GetRoles(bool teamRolesOnly);

        /// <summary>
        /// Gets the role by ID.
        /// </summary>
        /// <param name="id">The id.</param>
        /// <returns>Role with specified ID.</returns>
        public abstract Role GetRoleByID(int id);

        /// <summary>
        /// Gets the role for user.
        /// </summary>
        /// <param name="user">The user.</param>
        /// <returns>Role for the specified user.</returns>
        public abstract Role GetRoleForUser(User user);
    }
}
